Skip to content

test(perf): raise performance thresholds to absorb LatencyHarness overhead - #3245

Open
nathangeology wants to merge 2 commits into
kubernetes-sigs:mainfrom
nathangeology:test/perf-threshold-lifts
Open

test(perf): raise performance thresholds to absorb LatencyHarness overhead#3245
nathangeology wants to merge 2 commits into
kubernetes-sigs:mainfrom
nathangeology:test/perf-threshold-lifts

Conversation

@nathangeology

Copy link
Copy Markdown
Contributor

Fixes #N/A

Description

The basic and wideDeployments performance suites carry inline base thresholds that predate the LatencyHarness metric scraping added in the perf-reporting improvements track. The harness adds observable overhead to the captured window (roughly 0.10 cores average CPU and 30–60 MB P95 memory), which is enough to push three thresholds over their historical caps on a normal run.

This change raises three base thresholds and corrects one assertion message. Regression sensitivity is retained: the new values keep any 50-percent-or-greater regression detectable.

test/suites/performance/basic_test.go:

  • basic/scaleOut MemoryThreshold 260 → 320 MB
  • basic/consolidation MemoryThreshold 260 → 320 MB
  • basic/consolidation CPUThreshold 0.25 → 0.40 cores

test/suites/performance/wide_deployments_test.go:

  • wideDeployments/consolidation CPUThreshold 0.30 → 0.45 cores
  • wideDeployments/scaleOut TotalTime assertion message: "less than 10 minutes" → "less than 5 minutes" to match the 5-minute constant

All other thresholds in these files are left as-is (not observed to breach). Provider-specific overrides continue to work through the KARPENTER_PERF_THRESHOLDS env var from #3165.

How was this change tested?

make verify passes locally. go vet ./test/suites/performance/ and go test -c ./test/suites/performance/ succeed on the rebased branch. The perf assertions themselves run under kind-perf-e2e and cannot be exercised outside that harness; the values were chosen to leave headroom over recently observed samples rather than from a full re-baseline capture.

AI Disclosure

I used an LLM to parallel program with me on this. That included drafting the initial commit messages and PR description, and proposing the specific threshold values from a review of the observed run samples. Each value was accepted by me after checking it against the historical base and the LatencyHarness overhead.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Absorbs LatencyHarness (750de8d) scrape overhead. Previous 260 MB was
captured before the harness landed and reports > 260 MB post-harness.
Bumping basic/consolidation avg CPU base 0.25 -> 0.40 for the same reason.
Regression detection retained: a 50-percent regression still trips.

Signed-off-by: Nathaniel Jones <jonesflp@amazon.com>
Absorbs LatencyHarness (750de8d) scrape overhead. Observed avg CPU is at
the previous 0.30 base with no headroom. 0.45 retains detection of a
50-percent regression. Fixes a comment/constant mismatch on scaleOut
TotalTime (5 min constant, message said 10 min).

Signed-off-by: Nathaniel Jones <jonesflp@amazon.com>
@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nathangeology
Once this PR has been reviewed and has the lgtm label, please assign maciekpytel for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant